/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controllers;

import entities.*;
import facade.facadeClass;
import java.sql.Date;

/**
 *
 * @author Eduardo
 */
public class InitialValues {

    private facadeClass facade = new facadeClass();

    public InitialValues() {
        insertDocumentType((int) 1, "CC");
        insertDocumentType((int) 2, "CE");

        insertFranchise((long) 1, "AMEX");
        insertFranchise((long) 2, "MC");
        insertFranchise((long) 3, "VISA");

        insertTraceState((long) 1, "Pasó Análisis Sintáctico", "VALIDO");
        insertTraceState((long) 2, "No Pasó Análisis Sintáctico", "INVALIDO");
        insertTraceState((long) 3, "Pasó Análisis Semántico", "VALIDO");
        insertTraceState((long) 4, "No Pasó Análisis Semántico", "INVALIDO");

        insertArchive(1);
    }

    public void insertDocumentType(int num, String type) {
        DocumentType entityDocumentType = new DocumentType(num, type);
        facade.create(entityDocumentType);
    }

    public void insertFranchise(long num, String type) {
        Franchise entityFranchise = new Franchise(num, type);
        facade.create(entityFranchise);
    }

    public void insertTraceState(long num, String type, String nameState) {
        TraceState entityTraceState = new TraceState(num, type, nameState);
        facade.create(entityTraceState);
    }

    public void insertArchive(int num) {
        Date date = new Date(12);
        Archive entityArchive = new Archive((long) num, 1, 1001, 23, 5, "C:/asf", date, date, 10, 2);
        facade.create(entityArchive);
    }
}
